package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.CompanySaleServerAddDTO;
import org.jsola.hr.dto.CompanySaleServerUpdateDTO;
import org.jsola.hr.entity.CompanySaleServerDO;
import org.jsola.hr.query.CompanySaleServerQuery;
import org.jsola.hr.vo.CompanySaleServerListVO;
import org.jsola.hr.vo.CompanySaleServerVO;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * 用工单位服务
 *
 * @author zhr
 */
@Api(tags = "hr-用工单位服务")
public interface ICompanySaleServerControllerAPI {

    /**
     * 新增用工单位服务
     * @param companySaleServerAddDTO 用工单位服务新增实体
     * @return 用工单位服务展示对象
     */
    @ApiOperation(value = "新增用工单位服务")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companySaleServerAddDTO", dataType = "CompanySaleServerAddDTO", value = "新增用工单位服务", paramType = "body")
    })
    Result<CompanySaleServerVO> save(CompanySaleServerAddDTO companySaleServerAddDTO);


    /**
     * 修改用工单位服务
     * @param companySaleServerUpdateDTO 用工单位服务
     * @return 更新数量
     */
    @ApiOperation(value = "修改用工单位服务")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companySaleServerUpdateDTO", dataType = "CompanySaleServerUpdateDTO", value = "修改用工单位服务", paramType = "body")
    })
    Result<Integer> update(CompanySaleServerUpdateDTO companySaleServerUpdateDTO);




    /**
     * 删除单个用工单位服务，彻底删除
     * @param companySaleServerId 用工单位服务id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个用工单位服务，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companySaleServerId", dataType = "String", value = "用工单位服务id", paramType = "path")
    })
    Result<Integer> delete(String companySaleServerId);


    /**
     * 批量删除用工单位服务，彻底删除
     * @param companySaleServerIds 用工单位服务id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除用工单位服务，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companySaleServerIds", dataType = "String[]", value = "用工单位服务id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] companySaleServerIds);


    /**
     * 根据用工单位服务id查询用工单位服务详情
     * @param companySaleServerId 用工单位服务id
     * @return 用工单位服务详情
     */
    @ApiOperation(value="根据用工单位服务id查询用工单位服务详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companySaleServerId", dataType = "String", value = "用工单位服务id", paramType = "path")
    })
    Result<CompanySaleServerVO> findById(String companySaleServerId);


    /**
     * 查询用工单位服务
     * @param companySaleServerQuery 用工单位服务查询参数
     * @return page
     */
    @ApiOperation(value="查询用工单位服务")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companySaleServerQuery", dataType = "CompanySaleServerQuery", value = "用工单位服务查询参数", paramType = "query")
    })
    Result<List<CompanySaleServerListVO>> listAll(CompanySaleServerQuery companySaleServerQuery);


     /**
     * 分页查询用工单位服务
     * @param companySaleServerQuery 用工单位服务查询参数
     * @return page
     */
    @ApiOperation(value="分页查询用工单位服务")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companySaleServerQuery", dataType = "CompanySaleServerQuery", value = "用工单位服务查询参数", paramType = "query")
    })
    Result<Page<CompanySaleServerListVO>> page(CompanySaleServerQuery companySaleServerQuery);

    /**
     * 查询用工单位下的服务列表
     *
     * @param companyId 用工单位Id
     * @return 服务列表
     */
    @ApiOperation(value="查询用工单位下的服务列表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companyId", dataType = "String", value = "用工单位Id", paramType = "path")
    })
    Result<List<CompanySaleServerDO>> selectCompanyServerList(String companyId);
}

